package com.neusoft.neuiotms.dcom.converter.insurance;

import org.springframework.stereotype.Component;

import com.neusoft.bizcore.web.dto.AbstractConverter;
import com.neusoft.neuiotms.dcom.dto.insurance.InsuranceSummaryTaskFilesDTO;
import com.neusoft.neuiotms.dcom.model.insurance.InsuranceSummaryTaskFiles;

@Component
public class InsuranceSummaryTaskFilesConverter
        extends AbstractConverter<InsuranceSummaryTaskFiles, InsuranceSummaryTaskFilesDTO> {

    @Override
    public InsuranceSummaryTaskFiles toModel(final InsuranceSummaryTaskFilesDTO dto) {

        final InsuranceSummaryTaskFiles model = new InsuranceSummaryTaskFiles();
        model.setFsId(dto.getFsId());
        model.setName(dto.getName());
        return model;
    }

    @Override
    public InsuranceSummaryTaskFilesDTO toDTO(final InsuranceSummaryTaskFiles model,
            final boolean forListView) {

        final InsuranceSummaryTaskFilesDTO dto = new InsuranceSummaryTaskFilesDTO();
        dto.setId(model.getId());
        dto.setFsId(model.getFsId());
        dto.setName(model.getName());
        return dto;
    }

}
